package god;

import java.util.Scanner;

public class J01Account {
	public static double getMonthlyinterestRate(double a, double b) {
		double g;
		g = a/12;
		return g;
	}
	
	public static double withDraw(double c, double d) {
		double h;
		h = c - d;
		return h;
	}
	
	public static double deposit(double e, double f) {
		double i;
		i = e + f;
		return i;
	}
	public static void main(String[] agrs) {
		int aid = 0, dateCreated;
		double  balance = 0, interestRate = 0, monthlyinterestRate, draw, draw1, deposit1, deposit2;
		
		System.out.println("계좌번호, 개설일, 잔액, 연간 이자율을 입력해 주세요");
		Scanner scanner = new Scanner(System.in);
		aid = scanner.nextInt();
		dateCreated = scanner.nextInt();
		balance = scanner.nextDouble();
		interestRate = scanner.nextDouble();
		
		monthlyinterestRate = getMonthlyinterestRate(interestRate, 12);
		
		System.out.println("인출 할 금액을 입력해 주세요");
		Scanner sc1 = new Scanner(System.in);
		draw = sc1.nextDouble();
		draw1 = withDraw(balance,draw);
		
		System.out.println("예금할 액수를 입력해 주세요");
		Scanner sc2 = new Scanner(System.in);
		deposit1 = sc2.nextDouble();
		deposit2 = deposit(draw1,deposit1);
		
		System.out.println("계좌번호 = " + aid);
		System.out.println("계좌 개설일 = " + dateCreated);
		System.out.println("출금 후 잔액 = " + draw1);
		System.out.println("입금 후 잔액 = " + deposit2);
		System.out.println("연간 이자율 = " + interestRate);
		System.out.println("월간 이자율 = " + monthlyinterestRate);
	}
}
